﻿using System;
using System.Text;

namespace dotHTML.HTML {
    /// <summary>
    /// Represents an image map.
    /// </summary>
    [Serializable]
    public class Map : Element {
        private string _name;

        /// <summary>
        /// Constructs a new Map element with the given name.
        /// </summary>
        /// <param name="name">The name of this map.</param>
        public Map(string name) {
            _name = name;
        }

        /// <summary>
        /// Gets a formatted string of all local attributes of this element
        /// (not including the base attributes).
        /// </summary>
        /// <param name="sb">The StringBuilder to write this element's
        /// attribute data to.</param>
        protected override void WriteLocalAttributes(StringBuilder sb) {
            AttributeWriter.Write(sb, _name, "name");
        }
    }
}
